<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page trimDirectiveWhitespaces="true" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<div class="page">
    <div class="pageContent">
        <form method="post" action="/admin/ajaxUpdateUser.htm" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
            <div class="pageFormContent" layoutH="58">
                <input type="hidden" name="tabid" id="tabid" value="${tabid}"/>
                <input type="hidden" name="userId" id="userId" value="${tUser.userId}"/>
                <div class="unit">
                    <label for="nickName" style="text-align: right;">用户账号：</label>
                    <input id="nickName" class="required" name="nickName" type="text" minlength="4" maxlength="16" value="${tUser.nickName}" style="width: 180px;"/>
                </div>
                <div class="unit">
                    <label for="pwd"  style="text-align: right;">密码：</label> 
                    <input id="pwd" class="required" name="pwd" type="password" minlength="4" maxlength="32" value="${tUser.pwd}" style="width: 180px;"/>
                </div>
                <div class="unit">
                    <label for="repwd" style="text-align: right;">重复密码：</label> 
                    <input id="repwd" class="required" name="repwd"  equalTo="#pwd" type="password" minlength="4" maxlength="32" value="${tUser.pwd}" style="width: 180px;"/>
                </div>
                <div class="unit">
                    <label for="repwd" style="text-align: right;">用户姓名：</label>
                    <input id="realName" class="" name="realName" type="text" value="${tUser.realName}" maxlength="10" style="width: 180px;"/>
                </div>
                <div class="unit">
                    <label for="repwd" style="text-align: right;">所属角色：</label>
                    <ul style="padding-left: 130px;width: 400px;">
                        <c:forEach items="${allRoles}" var="role" varStatus="s">
                            <li style="float: left;">
                                <input type="checkbox" name="roleIds" id="roleIds" style="vertical-align:middle;float:left;" value="${role.roleId}" 
                                <c:forEach items="${tUser.roles}" var="r">
                                    <c:if test="${role.roleId eq r.roleId}">checked="checked"</c:if>
                                </c:forEach>>
                                <label style=" float: left;font-family: Tahoma;font-size: 12px;height: 21px;overflow: hidden;width: 60px;">${role.roleName}</label>
                            </li>
                        </c:forEach>
                    <ul>
                </div>
                <div class="unit">
                    <label for="memberRank" style="text-align: right;">会员等级：</label>
                    <select class="combox" id="memberRank" name="memberRank">
                        <option value="-1">会员等级</option>
                        <c:forEach items="${allMemberRank}" var="mr">
                            <option value="${mr.memberRankId}" <c:if test="${mr.memberRankId eq tUser.TMemberRank.memberRankId}">selected="selected"</c:if>>
                               ${mr.memberRankName}
                            </option>
                        </c:forEach>
                    </select>
                </div>
            </div>
            <div class="formBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
                    <li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
                </ul>
            </div>
        </form>
    </div>
</div>  